/*
 * BMP085.h
 *
 * Created: 2014-12-10 23:04:05
 *  Author: stratus
 */ 


#ifndef BMP085_H_
#define BMP085_H_
#endif /* BMP085_H_ */

#define BMP085_addres 0x77

struct BMP085_t{
	int16_t ac1;
	int16_t ac2;
	int16_t ac3;
	uint16_t ac4;
	uint16_t ac5;
	uint16_t ac6;
	int16_t b1;
	int16_t b2;
	int16_t mb;
	int16_t mc;
	short md;
	uint16_t temperature;
	uint32_t pressure;
	uint16_t ut;
	uint16_t up;
};

uint16_t BMP085_Read2Byte(uint8_t);
void BMP085_Cal(struct BMP085_t);
uint16_t BMP085_ReadTemp(void);
uint16_t BMP085_ReadPressure(void);
void BMP085_Update(struct BMP085_t);
void BMP085_CalFast(struct BMP085_t);